<template>
    <el-menu
        default-active="$route.path"
        class="menu"
        router
        @open="handleOpen"
        @close="handleClose"
        background-color="#545c64"
        text-color="#fff"
        active-text-color="#ffd04b">
        <div class="userAvatar">
            <el-avatar src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"></el-avatar>
        </div>
        <el-row class="welcomeFont" style="color:#fff; padding-left:30px">Welcome!工厂管理员</el-row>
        <el-menu-item index="/factory/equipManage">
          <i class="el-icon-menu"></i>
          <span >我的设备</span>
        </el-menu-item>
        <el-menu-item index="/factory/factoryOrderManage">
          <i class="el-icon-goods"></i>
          <span >订单管理</span>
        </el-menu-item>
    </el-menu>
</template>

<script>
export default {
  name: 'pageAsideForFactory',
   methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      }
    }
}
</script>

<style lang="less" scoped>
.userAvatar{
    padding: 30px 0px 0px 80px;
    display: flex;
}
.welcomeFont{
    width: 100%;
    padding: 30px 20px;
    text-align: center;
}
.menu{
    width:100%;
    display: block;
    float: left;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100%;
}
.el-menu-item {
  display:flex;
  position: relative;
  align-items: center;
  width: 100%;
}
.el-menu-item span {
  white-space: normal;
  word-break: break-all;
  line-height: 20px;
  flex: 1;
}
</style>
